const chai = require("chai");
const should = chai.should();
const chaiHttp = require("chai-http");
const expect = chai.expect;
chai.use(chaiHttp);

const wallet = require("../hd-wallet");

// const BASE_URL = "/tx";

describe("test Transanctions:", async () => {
    it("it should return Transanctions", done => {

        let walletObject = wallet.createHDWallet();
        console.log('walletObject:==>',walletObject);
       
        let serializedTx = wallet.signedTransaction(walletObject.privateKey);
        console.log('serializedTx:==>',serializedTx.toString('hex'));
        // wallet.sendSignedTransaction(serializedTx);


        let dk_key = wallet.createKey();
        console.log('test *****************************************************dk_key:==>',dk_key)
        let keyObject = wallet.exportKey(dk_key);
        console.log('test *****************************************************keyObject:==>',keyObject)
        wallet.importKey(keyObject);

        done();
        // chai
        //     .request(server)
        //     .get(`${BASE_URL}` + `?txid="0x80915aa8de673a65ea31e7c7b999df1e2bcbce81405a35636fdf553ce21e32fd"`)
        //     // .set("x-access-token", accessToken)
        //     .end((err, res) => {
        //         expect(err).equal(null);
        //         expect(res).to.have.status(200);
        //         expect(res.body.status).to.equal("0000");
        //         console.log("data:", res.body);
        //         done();
        //     });
    });
});